home *** CD-ROM | disk | FTP | other *** search
- #include <exec/types.h>
- /* This file MUST be the gcc ppc stdarg.h file so
- * i put the /ade/amigaos-ppc/include/ path as the first
- * to search for in the makefile
- */
- #include <stdarg.h>
- #include <powerup/gcclib/powerup_protos.h>
-
- /* Optional Symbol filter for the library
- */
-
- char* __LIB_LibTable[]=
- {
- "Add",
- "Sub",
- "Print",
- NULL
- };
-
- /* Optional Version
- */
- ULONG __LIB_Version=42;
- ULONG __LIB_Revision=666;
-
- /* Optional Init for the library
- */
- void* __LIB_Init(void *LibObject)
- {
- return(LibObject);
- }
-
- /* Optional Expunge for the library
- * If you return NULL the object isn`t
- * removed.
- */
- void* __LIB_Expunge(void *LibObject)
- {
- return(LibObject);
- }
-
- /* Optional Open for the library
- * If you return NULL the object isn`t
- * opened.
- */
- void* __LIB_Open(void *LibObject)
- {
- return(LibObject);
- }
-
-
- /* Optional Close for the library
- * If you return NULL the object isn`t
- * closed.
- */
- void* __LIB_Close(void *LibObject)
- {
- return(LibObject);
- }
-
- ULONG Add(ULONG a,
- ULONG b)
- {
- return(a + b);
- }
-
- ULONG Sub(ULONG a,
- ULONG b)
- {
- return(a - b);
- }
-
-
-
- int Print(const char *FmtString,
- ...)
- {
- va_list args;
- int Result;
-
- va_start(args,FmtString);
-
- Result = PPCvprintf(FmtString,
- args);
-
- va_end(args);
- return(Result);
- }
-